package com.demo.controller;

import com.demo.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;

/**
 * @author vivi
 * @description
 * @date 2024/5/22
 */
@Controller
public class UserController {
    @Autowired
    private User user1;
    public void getUser() {
        System.out.println("sehun User:" + user1);
        User u = user1;
        u.setName("vivi");
        System.out.println("vivi u:" + u);
    }
}
















